package com.mgface.springcloud.framework;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wanyuxiang
 * @version 1.0
 * @project SpringCloudDev
 * @create 2017-04-10 10:38
 **/

@Configuration
@EnableAutoConfiguration
@RestController
public class Application {

    @Value("${config.name:world}")
    private String name;

    @RequestMapping("/")
    public String home() {
        return "Hello" + name;
    }

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}
